import Axios from 'axios'

import { ElMessage } from 'element-plus'

export function sessmsg(msg) {
    return ElMessage({
        message: msg,
        type: 'success',
    }) 
}
export function errmsg(msg) {
    return setTimeout(() => {
        ElMessage.error(msg)  
    }, 500);
}

// 常用请求封装 get post put delete
export function get(url,params){
    return Axios.get(url,params)
}

export function post(url,params){
    return Axios.post(url,params)
}

export function put(url,params){
    return Axios.put(url,params)
}

export function del(url,params){
    return Axios.delete(url,params)
}